package com.yqg.education.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * exam_log 实体类
 *
 * @author 张芸博
 * @since 2025-04-07
 */
@Getter
@Setter
@TableName("exam_log")
public class ExamLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 试卷ID
     */
    private Long exampaperId;

    /**
     * 课程ID
     */
    private Long courseId;

    /**
     * 学员ID
     */
    private Long stuId;

    /**
     * 试卷进度 0未完成；1已完成
     */
    private Integer flow;

    /**
     * 试卷得分
     */
    private BigDecimal exampaperGetScore;

    /**
     * 答题时间
     */
    private LocalTime answerTime;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    /**
     * 是否及格 0不及格，1及格
     */
    private Integer isPass;

    /**
     * 是否删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private String exampaperName;

    @TableField(exist = false)
    private String courseName;

    @TableField(exist = false)
    private String trainClassNum;

    /**
     * 排名
     */
    @TableField(exist = false)
    private Integer rank;
    /**
     * 正确的题目总数
     */
    @TableField(exist = false)
    private Integer correctQuantityNum;
    /**
     * 考试题目数量
     */
    @TableField(exist = false)
    private Integer exampaperNum;
}
